import {Route} from 'react-router';
import stores from './stores/index';
import Home from './components/Home';
import MouldTypeListPage from './components/mouldtype/MouldTypeListPage';
import MouldListPage from './components/mould/MouldListPage';
import ImportMouldComponent from './components/mould/ImportMouldComponent';
import WorkflowSettingListPage from './components/workflowSetting/WorkflowSettingListPage';
import SystemSettingPage from './components/systemSetting/SystemSettingPage';
import {WeaLocaleProvider} from "ecCom";
import {addEngineStyle} from './util/CommonUtil';

const getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'contractmanagement');
const Routes = (
    <Route path='cm' name="cm" breadcrumbName="合同范本" onEnter={getLocaleLabel}
           component={Home}>
        <Route path="mouldType" name="mouldType" breadcrumbName="模板类型" component={MouldTypeListPage}/>
        <Route path="mould" name="mould" breadcrumbName="合同模板" component={MouldListPage}/>
        <Route path="workflowSetting" name="workflowSetting" breadcrumbName="流程设置" component={WorkflowSettingListPage}/>
        <Route path="systemSetting" name="systemSetting" breadcrumbName="应用设置" component={SystemSettingPage}/>
        <Route path="importMould" name="importMould" breadcrumbName="上传模板" component={ImportMouldComponent}/>
    </Route>
)

module.exports = {
    Route: Routes,
    store: stores
};